package cn.jbit.smbms.service.impl;

import cn.jbit.smbms.dao.ProviderDao;
import cn.jbit.smbms.pojo.Provider;
import cn.jbit.smbms.service.ProviderService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

@Service
public class ProviderServiceImpl implements ProviderService {

    @Autowired
    private ProviderDao providerDao;

    @Override
    public List<Provider> providerlist() {
        return providerDao.providerlist();
    }

    @Override
    public int queryListCount(Map<String, Object> param) {
        return providerDao.queryListCount(param);
    }

    @Override
    public List<Provider>queryListByParam(Map<String, Object> param) {
        return providerDao.queryListByParam(param);
    }

    @Override
    public int addProvider(Provider provider) {
        return providerDao.insert(provider);


    }

    @Override
    public int deleteById(Integer id) {
        return providerDao.deleteById(id);
    }

    @Override
    public Provider queryProviderView(Integer id) {
        return providerDao.selectProviderById(id);
    }

    @Override
    public int updateProvider(Provider provider) {
        return providerDao.updateProvider(provider);
    }
}
